package sparkSQL.study

import org.apache.spark.SparkConf
import org.apache.spark.sql.SparkSession

object SparkHiveStudy {
  def main(args: Array[String]): Unit = {

    val sparkHiveStudy = new SparkConf().setMaster("local[*]").setAppName("SparkHiveStudy")
    val sparkSession = SparkSession.builder().enableHiveSupport().config(sparkHiveStudy).getOrCreate()

    sparkSession.sql("show tables").show()
    sparkSession.sql(
      """
        |select * from business;
        |""".stripMargin
    ).show()
    sparkSession.sql(
      """
        |select * from user_visit_action
        |""".stripMargin).show()

    sparkSession.stop()

  }

}
